package com.ycMc.mapper;

import com.ycMc.domain.Product;
import com.ycMc.domain.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by libo2 on 2017/8/15.
 */
@Repository
public interface UserMapper {

    public void insert(User user);
    public void delete(@Param("userId")String userId);
    public void update(User user);
    public void updateUserMoney(User user);
    public List<User> select(@Param("loginName")String loginName,
                             @Param("realName")String realName,
                             @Param("address")String address,
                             @Param("phone")String phone,
                             @Param("permission")int permission,
                             @Param("shoppingAddress")String shoppingAddress,
                             @Param("userId")String userId,
                             @Param("offset")int offset,@Param("pageSize")int pageSize);
    public User selectOne(@Param("userId")String userId);

    /*判断登录*/
    public User checkLogin(@Param("loginName")String loginName,@Param("password")String password);

    public List<User> query(@Param("keyword")String keyword,
                             @Param("offset")int offset,@Param("pageSize")int pageSize);

}
